
// 按需加载

const Home =()=>import('../pages/Home')
const Chart =()=>import('../pages/Chart')
const Messegs =()=>import('../pages/Messegs')
const Setting =()=>import('../pages/Setting')
const Container =()=>import('../pages/Container')
const Login =()=>import('../pages/Login')
const Renli =()=>import('../components/ChildArea/Renli')
const About =()=>import('../pages/About')
const Version =()=>import('../pages/Version')
const routes = [{
    path:'/',
    // redirect:'/home/renli'
    redirect:'/login'
},{
    path:'/home/renli',
    component:Home,
    isNav:true,
    icon:require('@/assets/sider/sider1.png'),
    children:[{
        path:'/home/:container',
        component:Container,
        props:true,
        //三级路由
          children: [{
            path:'/home/:container/:id',
            component:Renli,
            props:true
        }]
     }],
  
     
},{
    path:'/setting/sheze1',
    component:Setting,
    isNav:true,
    icon:require('@/assets/sider/sider2.png'),
    children:[{
        path:'/setting/:container',
        component:Container,
        props:true
     }]
},{
    
    path:'/chart/tu1',
    component:Chart,
    isNav:true,
    icon:require('@/assets/sider/sider3.png'),
    children:[{
        path:'/chart/:container',
        component:Container,
        props:true
     }]
},{
    path:'/messegs/xinxi1',
    component:Messegs,
    isNav:true,
    icon:require('@/assets/sider/sider4.png'),
    children:[{
        path:'/messegs/:container',
        component:Container,
        props:true
     }]
},{
    path:'/login',
    component:Login
    
},{
    path:'/about',
    component:About
},{
    path:'/version',
    component:Version
}]

export default routes
